<?php
/* @var $this QuestionController */
/* @var $model Question */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'question-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>
 
	<div class="row">
		<?php echo $form->labelEx($model,'eventid'); ?>
		<?php
		    echo $form->dropDownList(
		            $model, 
		            'eventid', 
		            
		            CHtml::listData(
	                    Event::model()->findAll(),
	                    'id', 
	                    'title'
	                )
		      );
		?>
		<?php echo $form->error($model,'eventid'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'ask'); ?>
		<?php echo $form->textField($model,'ask',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'ask'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'question'); ?>
		<?php echo $form->textArea($model,'question',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'question'); ?>
	</div>

	 

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->